package lab02.test19;

public class Test19 {

    public static void main(String[] args) {

        String string = "HelloWord";
        StringBuffer stringBuffer = new StringBuffer();

        //1.实现字符串的大小写转换
        for(int i = 0;i <string.length();i++){
            char temp = string.charAt(i);
            if(temp >= 'A' && temp <= 'Z'){
                stringBuffer.append((char)(temp + 32));
            }else{stringBuffer.append((char)(temp - 32));}
        }

        //2.倒序输出
        String result = stringBuffer.toString();

        for(int i = result.length() - 1;i >= 0 ;i--){

            System.out.print(result.charAt(i));
        }
    }
}
